import { createRouter, createWebHashHistory, RouterOptions, Router, RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  { path: '/', name: 'Home', component: () => import('@/views/Home.vue') },
  { path: '/preview', name: 'Preview', component: () => import('@/views/Preview.vue') },
  { path: '/high-light', name: 'HighLight', component: () => import('@/views/HighLight.vue') },
  { path: '/xml', name: 'Xml', component: () => import('@/views/Xml.vue') }
]

const options: RouterOptions = {
  history: createWebHashHistory(),
  routes
}

// Router是路由对象类型
const router: Router = createRouter(options)

export default router
